open Base

type source
type value = int
include Comparator.S with type t = source

val time : source
val create : unit -> source

val equal : t -> t -> bool
val compare : t -> t -> int
val to_string : t -> string

type set = (t, comparator_witness) Set.t
type 'a map = (t, 'a, comparator_witness) Map.t
val empty_set : set
val empty_map : 'a map
val singleton : t -> set

module Private : sig
  val next_id : diff:int -> t
end

module State : sig
  type t
  val empty : t
  val of_time : int -> t
  val get_exn : source -> t -> value
  val set : source -> value -> t -> t
end
